package com.xxxx.blog.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.sun.xml.internal.ws.api.message.Attachment;
import com.xxxx.blog.utils.Entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_article")
public class Article extends Entity implements Serializable {

	//待审批
	public static Integer status_0 = 0;
	//已审批
	public static Integer status_1 = 1;
	/**
	 * 主键id
	 */
	@TableId(type = IdType.AUTO)
	private Integer id;
	/**
	 *
	 */
	private Integer channelId;
	/**
	 *
	 */
	private String title;
	/**
	 *
	 */
	private String titleImg;
	/**
	 *
	 */
	private String summary;
	/**
	 *
	 */
	private String author;
	/**
	 *
	 */
	private String url;
	/**
	 *
	 */
	private String content;
	/**
	 * 0待发布|1已发布
	 */
	private Integer status;
	/**
	 * 0/NULL允许评论|1不允许评论
	 */
	private Integer commentStatus;
	/**
	 * 0/NULL非轮播|1轮播
	 */
	private Integer rotation;
	/**
	 * 0/NULL不置顶 | 1 置顶
	 */
	private Integer top;
	/**
	 *
	 */
	private Integer orderby;
	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	private Date createDate;
	/**
	 *
	 */
	private Integer createUser;
	/**
	 *更新时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updateDate;

	private List<Map<String,Object>> attachmentList;

	private List<Integer> selectTagList;

	//关联栏目对象
	private Channel channel;

	//关联标签对象列表
	private List<Tag> tags;

	//关联附件对象列表
	private List<Attachment> attachments;
}
